import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
console.log("进入vite.conf111");
// https://vitejs.dev/config/
export default defineConfig({
  server: {
    // cors:true,
    host:'0.0.0.0',
    proxy:{
      // 子集放前面执行,否则不生效
      '/api/token':{
        target:'http://192.168.1.11:8899',
        changeOrigin:true,
      },
      '/api':{
        target:'http://127.0.0.1:8890',
        changeOrigin:true,
        // rewrite:(path)=>path.replace(/^\/api/,'') ,
      },
    }
  },
  plugins: [vue()]
})

